<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>IPC::System::Simple - Run commands simply, with detailed diagnostics - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of IPC-System-Simple - MetaCPAN" href="https://metacpan.org/dist/IPC-System-Simple/releases.rss" />
        <link rel="canonical" href="./IPC::System::Simple.html" />
        <meta name="description" content="Run commands simply, with detailed diagnostics" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/IPC::System::Simple" />
<meta name="twitter:title"       content="IPC::System::Simple" />
<meta name="twitter:description" content="Run commands simply, with detailed diagnostics" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./IPC::System::Simple.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of IPC-System-Simple was released.">
      <span class="relatize">24 Mar 2020 01:37:42 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/IPC-System-Simple">IPC-System-Simple</a>
  </li>
  <li>
    Module version: 1.30
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/IPC-System-Simple/source/lib/IPC/System/Simple.pm">Source</a>
    (<a href="https://metacpan.org/dist/IPC-System-Simple/source/lib/IPC/System/Simple.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/IPC-System-Simple/source/lib/IPC/System">Browse</a>
    (<a href="https://metacpan.org/dist/IPC-System-Simple/source/lib/IPC/System?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/IPC-System-Simple/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="http://thenceforward.net/perl/modules/IPC-System-Simple/">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/IPC-System-Simple/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/pjf/ipc-system-simple">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/pjf/ipc-system-simple/issues">Issues</a>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=IPC-System-Simple+1.30" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/I/IPC-System-Simple.html?oncpan=1&amp;distmat=1&amp;version=1.30&amp;grade=2" style="color: #090">7130</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/I/IPC-System-Simple.html?oncpan=1&amp;distmat=1&amp;version=1.30&amp;grade=3" style="color: #900">192</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/I/IPC-System-Simple.html?oncpan=1&amp;distmat=1&amp;version=1.30&amp;grade=4">1</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/JKEENAN/IPC-System-Simple-1.30">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on IPC-System-Simple who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/IPC-System-Simple-1.30/index.html">93.16% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/IPC-System-Simple/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-1.30.tar.gz">
      Download (<span itemprop="fileSize">31.15KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FJKEENAN%2FIPC-System-Simple-1.30%2Flib%2FIPC%2FSystem%2FSimple.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/IPC-System-Simple/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/IPC-System-Simple/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:IPC-System-Simple">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="IPC-System-Simple">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/IPC/System/Simple.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="JKEENAN/IPC-System-Simple-1.30"
>1.30
  (JKEENAN on 2020-03-24)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26"
>1.26
  (JKEENAN on 2020-01-25)</option>
<option
  
  value="PJF/IPC-System-Simple-1.25"
>1.25
  (PJF on 2013-10-20)</option>
<option
  
  value="PJF/IPC-System-Simple-1.24"
>1.24
  (PJF on 2013-10-18)</option>
<option
  
  value="PJF/IPC-System-Simple-1.23"
>1.23
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.22"
>1.22
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.21"
>1.21
  (PJF on 2010-03-23)</option>
<option
  
  value="PJF/IPC-System-Simple-1.20"
>1.20
  (PJF on 2010-01-09)</option>
<option
  
  value="PJF/IPC-System-Simple-1.19"
>1.19
  (PJF on 2009-12-04)</option>
<option
  
  value="PJF/IPC-System-Simple-1.18"
>1.18
  (PJF on 2009-02-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.17"
>1.17
  (PJF on 2008-12-19)</option>
<option
  
  value="PJF/IPC-System-Simple-0.16"
>0.16
  (PJF on 2008-09-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.15"
>0.15
  (PJF on 2008-07-20)</option>
<option
  
  value="PJF/IPC-System-Simple-0.14"
>0.14
  (PJF on 2008-07-18)</option>
<option
  
  value="PJF/IPC-System-Simple-0.13"
>0.13
  (PJF on 2008-07-17)</option>
<option
  
  value="PJF/IPC-System-Simple-0.12"
>0.12
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.11"
>0.11
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.10"
>0.10
  (PJF on 2008-05-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.09"
>0.09
  (PJF on 2008-05-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.08"
>0.08
  (PJF on 2008-04-13)</option>
<option
  
  value="PJF/IPC-System-Simple-0.07"
>0.07
  (PJF on 2008-04-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.06"
>0.06
  (PJF on 2007-09-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.05"
>0.05
  (PJF on 2007-04-09)</option>
<option
  
  value="PJF/IPC-System-Simple-0.04"
>0.04
  (PJF on 2006-10-30)</option>
<option
  
  value="PJF/IPC-System-Simple-0.03"
>0.03
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.02"
>0.02
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.01"
>0.01
  (PJF on 2006-07-23)</option>
<optgroup label="BackPAN">'
<option
  
  value="JKEENAN/IPC-System-Simple-1.29"
>1.29
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28"
>1.28
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28_001"
>1.28_001 DEV
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.27"
>1.27
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26-TRIAL"
>1.26-TRIAL DEV
  (JKEENAN on 2020-01-24)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/JKEENAN/IPC-System-Simple-1.30/diff/' + encodeURIComponent(this.value) + '/lib/IPC/System/Simple.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="JKEENAN/IPC-System-Simple-1.30"
>1.30
  (JKEENAN on 2020-03-24)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26"
>1.26
  (JKEENAN on 2020-01-25)</option>
<option
  
  value="PJF/IPC-System-Simple-1.25"
>1.25
  (PJF on 2013-10-20)</option>
<option
  
  value="PJF/IPC-System-Simple-1.24"
>1.24
  (PJF on 2013-10-18)</option>
<option
  
  value="PJF/IPC-System-Simple-1.23"
>1.23
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.22"
>1.22
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.21"
>1.21
  (PJF on 2010-03-23)</option>
<option
  
  value="PJF/IPC-System-Simple-1.20"
>1.20
  (PJF on 2010-01-09)</option>
<option
  
  value="PJF/IPC-System-Simple-1.19"
>1.19
  (PJF on 2009-12-04)</option>
<option
  
  value="PJF/IPC-System-Simple-1.18"
>1.18
  (PJF on 2009-02-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.17"
>1.17
  (PJF on 2008-12-19)</option>
<option
  
  value="PJF/IPC-System-Simple-0.16"
>0.16
  (PJF on 2008-09-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.15"
>0.15
  (PJF on 2008-07-20)</option>
<option
  
  value="PJF/IPC-System-Simple-0.14"
>0.14
  (PJF on 2008-07-18)</option>
<option
  
  value="PJF/IPC-System-Simple-0.13"
>0.13
  (PJF on 2008-07-17)</option>
<option
  
  value="PJF/IPC-System-Simple-0.12"
>0.12
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.11"
>0.11
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.10"
>0.10
  (PJF on 2008-05-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.09"
>0.09
  (PJF on 2008-05-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.08"
>0.08
  (PJF on 2008-04-13)</option>
<option
  
  value="PJF/IPC-System-Simple-0.07"
>0.07
  (PJF on 2008-04-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.06"
>0.06
  (PJF on 2007-09-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.05"
>0.05
  (PJF on 2007-04-09)</option>
<option
  
  value="PJF/IPC-System-Simple-0.04"
>0.04
  (PJF on 2006-10-30)</option>
<option
  
  value="PJF/IPC-System-Simple-0.03"
>0.03
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.02"
>0.02
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.01"
>0.01
  (PJF on 2006-07-23)</option>
<optgroup label="BackPAN">'
<option
  
  value="JKEENAN/IPC-System-Simple-1.29"
>1.29
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28"
>1.28
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28_001"
>1.28_001 DEV
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.27"
>1.27
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26-TRIAL"
>1.26-TRIAL DEV
  (JKEENAN on 2020-01-24)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Carp" title="Carp" class="ellipsis">Carp</a></li>
  <li><a href="https://metacpan.org/pod/Exporter" title="Exporter" class="ellipsis">Exporter</a></li>
  <li><a href="https://metacpan.org/pod/List::Util" title="List::Util" class="ellipsis">List::Util</a></li>
  <li><a href="https://metacpan.org/pod/POSIX" title="POSIX" class="ellipsis">POSIX</a></li>
  <li><a href="https://metacpan.org/pod/Scalar::Util" title="Scalar::Util" class="ellipsis">Scalar::Util</a></li>
  <li><a href="https://metacpan.org/pod/constant" title="constant" class="ellipsis">constant</a></li>
  <li><a href="https://metacpan.org/pod/re" title="re" class="ellipsis">re</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li><a href="https://metacpan.org/pod/warnings" title="warnings" class="ellipsis">warnings</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/IPC::System::Simple/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=IPC%3A%3ASystem%3A%3ASimple">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=IPC-System-Simple">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/JKEENAN/IPC-System-Simple-1.30/view/lib/IPC/System/Simple.pm">This version</a>
    </li>
    <li>
      <a href="./IPC::System::Simple.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/ABRAXXA"><img src="https://www.gravatar.com/avatar/b2dd4ce034bcb23b757d22d2061cb10d?d=identicon&amp;s=20" title="ABRAXXA" alt="ABRAXXA"></a>
<a class="display-all" href="https://metacpan.org/author/OALDERS"><img src="https://www.gravatar.com/avatar/7a66ba9f5f4af93dd55fcdc0e69c0b55?d=identicon&amp;s=20" title="OALDERS" alt="OALDERS"></a>
<a class="display-all" href="https://metacpan.org/author/PJF"><img src="https://www.gravatar.com/avatar/c796116002768900a951a1b08a35d513?d=identicon&amp;s=20" title="PJF" alt="PJF"></a>
<a class="display-all" href="https://metacpan.org/author/EMAZEP"><img src="https://www.gravatar.com/avatar/a700b943268e8937ffd425389d962787?d=identicon&amp;s=20" title="EMAZEP" alt="EMAZEP"></a>
<a class="display-all" href="https://metacpan.org/author/RRWO"><img src="https://www.gravatar.com/avatar/4a5274bc5d690ee3d619f044778771a7?d=identicon&amp;s=20" title="RRWO" alt="RRWO"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/IPC-System-Simple/plussers">20 PAUSE users</a>
</div>
<div>
    9 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="PJF"
      data-contrib-email="pjf@cpan.org"
    >
      <a href="https://metacpan.org/author/PJF" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/c796116002768900a951a1b08a35d513?d=identicon&amp;s=20" />
      Paul Fenwick
      </a>
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/JKEENAN" class="author-name">James E Keenan</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/IPC/System/Simple.pm&#39;" class="">
<option
  selected
  value="JKEENAN/IPC-System-Simple-1.30"
>1.30
  (JKEENAN on 2020-03-24)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26"
>1.26
  (JKEENAN on 2020-01-25)</option>
<option
  
  value="PJF/IPC-System-Simple-1.25"
>1.25
  (PJF on 2013-10-20)</option>
<option
  
  value="PJF/IPC-System-Simple-1.24"
>1.24
  (PJF on 2013-10-18)</option>
<option
  
  value="PJF/IPC-System-Simple-1.23"
>1.23
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.22"
>1.22
  (PJF on 2013-10-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.21"
>1.21
  (PJF on 2010-03-23)</option>
<option
  
  value="PJF/IPC-System-Simple-1.20"
>1.20
  (PJF on 2010-01-09)</option>
<option
  
  value="PJF/IPC-System-Simple-1.19"
>1.19
  (PJF on 2009-12-04)</option>
<option
  
  value="PJF/IPC-System-Simple-1.18"
>1.18
  (PJF on 2009-02-08)</option>
<option
  
  value="PJF/IPC-System-Simple-1.17"
>1.17
  (PJF on 2008-12-19)</option>
<option
  
  value="PJF/IPC-System-Simple-0.16"
>0.16
  (PJF on 2008-09-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.15"
>0.15
  (PJF on 2008-07-20)</option>
<option
  
  value="PJF/IPC-System-Simple-0.14"
>0.14
  (PJF on 2008-07-18)</option>
<option
  
  value="PJF/IPC-System-Simple-0.13"
>0.13
  (PJF on 2008-07-17)</option>
<option
  
  value="PJF/IPC-System-Simple-0.12"
>0.12
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.11"
>0.11
  (PJF on 2008-06-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.10"
>0.10
  (PJF on 2008-05-14)</option>
<option
  
  value="PJF/IPC-System-Simple-0.09"
>0.09
  (PJF on 2008-05-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.08"
>0.08
  (PJF on 2008-04-13)</option>
<option
  
  value="PJF/IPC-System-Simple-0.07"
>0.07
  (PJF on 2008-04-12)</option>
<option
  
  value="PJF/IPC-System-Simple-0.06"
>0.06
  (PJF on 2007-09-06)</option>
<option
  
  value="PJF/IPC-System-Simple-0.05"
>0.05
  (PJF on 2007-04-09)</option>
<option
  
  value="PJF/IPC-System-Simple-0.04"
>0.04
  (PJF on 2006-10-30)</option>
<option
  
  value="PJF/IPC-System-Simple-0.03"
>0.03
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.02"
>0.02
  (PJF on 2006-07-25)</option>
<option
  
  value="PJF/IPC-System-Simple-0.01"
>0.01
  (PJF on 2006-07-23)</option>
<optgroup label="BackPAN">'
<option
  
  value="JKEENAN/IPC-System-Simple-1.29"
>1.29
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28"
>1.28
  (JKEENAN on 2020-03-22)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.28_001"
>1.28_001 DEV
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.27"
>1.27
  (JKEENAN on 2020-03-21)</option>
<option
  
  value="JKEENAN/IPC-System-Simple-1.26-TRIAL"
>1.26-TRIAL DEV
  (JKEENAN on 2020-01-24)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/IPC-System-Simple">IPC-System-Simple-1.30</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 126 direct dependents &#10;          • 3984 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="IPC-System-Simple-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="IPC-System-Simple-1.30">
    <input type="hidden" name="author" value="JKEENAN">
    <input type="hidden" name="distribution" value="IPC-System-Simple">
    <button type="submit" class="favorite highlight"><span>29</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./IPC::System::Simple.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>29</span> ++</a>
</div>
   / <span>IPC::System::Simple</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./IPC::System::Simple.html#NAME">NAME</a></li>
  <li><a href="./IPC::System::Simple.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./IPC::System::Simple.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./IPC::System::Simple.html#ADVANCED-SYNOPSIS">ADVANCED SYNOPSIS</a></li>
  <li><a href="./IPC::System::Simple.html#ADVANCED-USAGE">ADVANCED USAGE</a>
    <ul>
      <li><a href="./IPC::System::Simple.html#run()-and-system()">run() and system()</a></li>
      <li><a href="./IPC::System::Simple.html#capture()">capture()</a></li>
      <li><a href="./IPC::System::Simple.html#runx(),-systemx()-and-capturex()">runx(), systemx() and capturex()</a></li>
      <li><a href="./IPC::System::Simple.html#Exception-handling">Exception handling</a>
        <ul>
          <li><a href="./IPC::System::Simple.html#Exception-cases">Exception cases</a></li>
        </ul>
      </li>
      <li><a href="./IPC::System::Simple.html#Exit-values">Exit values</a>
        <ul>
          <li><a href="./IPC::System::Simple.html#$EXITVAL">$EXITVAL</a></li>
        </ul>
      </li>
      <li><a href="./IPC::System::Simple.html#WINDOWS-SPECIFIC-NOTES">WINDOWS-SPECIFIC NOTES</a></li>
    </ul>
  </li>
  <li><a href="./IPC::System::Simple.html#DIAGNOSTICS">DIAGNOSTICS</a></li>
  <li><a href="./IPC::System::Simple.html#DEPENDENCIES">DEPENDENCIES</a></li>
  <li><a href="./IPC::System::Simple.html#COMPARISON-TO-OTHER-APIs">COMPARISON TO OTHER APIs</a></li>
  <li><a href="./IPC::System::Simple.html#BUGS">BUGS</a>
    <ul>
      <li><a href="./IPC::System::Simple.html#Reporting-bugs">Reporting bugs</a></li>
    </ul>
  </li>
  <li><a href="./IPC::System::Simple.html#FEEDBACK">FEEDBACK</a></li>
  <li><a href="./IPC::System::Simple.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./IPC::System::Simple.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./IPC::System::Simple.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>IPC::System::Simple - Run commands simply, with detailed diagnostics</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>  use IPC::System::Simple qw(system systemx capture capturex);

  system(&quot;some_command&quot;);        # Command succeeds or dies!

  system(&quot;some_command&quot;,@args);  # Succeeds or dies, avoids shell if @args

  systemx(&quot;some_command&quot;,@args); # Succeeds or dies, NEVER uses the shell


  # Capture the output of a command (just like backticks). Dies on error.
  my $output = capture(&quot;some_command&quot;);

  # Just like backticks in list context.  Dies on error.
  my @output = capture(&quot;some_command&quot;);

  # As above, but avoids the shell if @args is non-empty
  my $output = capture(&quot;some_command&quot;, @args);

  # As above, but NEVER invokes the shell.
  my $output = capturex(&quot;some_command&quot;, @args);
  my @output = capturex(&quot;some_command&quot;, @args);</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Calling Perl&#39;s in-built <code>system()</code> function is easy, determining if it was successful is <i>hard</i>. Let&#39;s face it, <code>$?</code> isn&#39;t the nicest variable in the world to play with, and even if you <i>do</i> check it, producing a well-formatted error string takes a lot of work.</p>

<p><code>IPC::System::Simple</code> takes the hard work out of calling external commands. In fact, if you want to be really lazy, you can just write:</p>

<pre><code>    use IPC::System::Simple qw(system);</code></pre>

<p>and all of your <code>system</code> commands will either succeed (run to completion and return a zero exit value), or die with rich diagnostic messages.</p>

<p>The <code>IPC::System::Simple</code> module also provides a simple replacement to Perl&#39;s backticks operator. Simply write:</p>

<pre><code>    use IPC::System::Simple qw(capture);</code></pre>

<p>and then use the <a href="./IPC::System::Simple.html#capture()">&quot;capture()&quot;</a> command just like you&#39;d use backticks. If there&#39;s an error, it will die with a detailed description of what went wrong. Better still, you can even use <code>capturex()</code> to run the equivalent of backticks, but without the shell:</p>

<pre><code>    use IPC::System::Simple qw(capturex);

    my $result = capturex($command, @args);</code></pre>

<p>If you want more power than the basic interface, including the ability to specify which exit values are acceptable, trap errors, or process diagnostics, then read on!</p>

<h1 id="ADVANCED-SYNOPSIS"><a id="ADVANCED"></a>ADVANCED SYNOPSIS</h1>

<pre><code>  use IPC::System::Simple qw(
    capture capturex system systemx run runx $EXITVAL EXIT_ANY
  );

  # Run a command, throwing exception on failure

  run(&quot;some_command&quot;);

  runx(&quot;some_command&quot;,@args);  # Run a command, avoiding the shell

  # Do the same thing, but with the drop-in system replacement.

  system(&quot;some_command&quot;);

  systemx(&quot;some_command&quot;, @args);

  # Run a command which must return 0..5, avoid the shell, and get the
  # exit value (we could also look at $EXITVAL)

  my $exit_value = runx([0..5], &quot;some_command&quot;, @args);

  # The same, but any exit value will do.

  my $exit_value = runx(EXIT_ANY, &quot;some_command&quot;, @args);

  # Capture output into $result and throw exception on failure

  my $result = capture(&quot;some_command&quot;); 

  # Check exit value from captured command

  print &quot;some_command exited with status $EXITVAL\n&quot;;

  # Captures into @lines, splitting on $/
  my @lines = capture(&quot;some_command&quot;); 

  # Run a command which must return 0..5, capture the output into
  # @lines, and avoid the shell.

  my @lines  = capturex([0..5], &quot;some_command&quot;, @args);</code></pre>

<h1 id="ADVANCED-USAGE"><a id="ADVANCED1"></a>ADVANCED USAGE</h1>

<h2 id="run()-and-system()"><a id="run"></a><a id="run--and-system"></a>run() and system()</h2>

<p><code>IPC::System::Simple</code> provides a subroutine called <code>run</code>, that executes a command using the same semantics as Perl&#39;s built-in <code>system</code>:</p>

<pre><code>    use IPC::System::Simple qw(run);

    run(&quot;cat *.txt&quot;);           # Execute command via the shell
    run(&quot;cat&quot;,&quot;/etc/motd&quot;);     # Execute command without shell</code></pre>

<p>The primary difference between Perl&#39;s in-built system and the <code>run</code> command is that <code>run</code> will throw an exception on failure, and allows a list of acceptable exit values to be set. See <a href="./IPC::System::Simple.html#Exit-values">&quot;Exit values&quot;</a> for further information.</p>

<p>In fact, you can even have <code>IPC::System::Simple</code> replace the default <code>system</code> function for your package so it has the same behaviour:</p>

<pre><code>    use IPC::System::Simple qw(system);

    system(&quot;cat *.txt&quot;);  # system now succeeds or dies!</code></pre>

<p><code>system</code> and <code>run</code> are aliases to each other.</p>

<p>See also <a href="./IPC::System::Simple.html#runx(),-systemx()-and-capturex()">&quot;runx(), systemx() and capturex()&quot;</a> for variants of <code>system()</code> and <code>run()</code> that never invoke the shell, even with a single argument.</p>

<h2 id="capture()"><a id="capture"></a>capture()</h2>

<p>A second subroutine, named <code>capture</code> executes a command with the same semantics as Perl&#39;s built-in backticks (and <code>qx()</code>):</p>

<pre><code>    use IPC::System::Simple qw(capture);

    # Capture text while invoking the shell.
    my $file  = capture(&quot;cat /etc/motd&quot;);
    my @lines = capture(&quot;cat /etc/passwd&quot;);</code></pre>

<p>However unlike regular backticks, which always use the shell, <code>capture</code> will bypass the shell when called with multiple arguments:</p>

<pre><code>    # Capture text while avoiding the shell.
    my $file  = capture(&quot;cat&quot;, &quot;/etc/motd&quot;);
    my @lines = capture(&quot;cat&quot;, &quot;/etc/passwd&quot;);</code></pre>

<p>See also <a href="./IPC::System::Simple.html#runx(),-systemx()-and-capturex()">&quot;runx(), systemx() and capturex()&quot;</a> for a variant of <code>capture()</code> that never invokes the shell, even with a single argument.</p>

<h2 id="runx(),-systemx()-and-capturex()"><a id="runx"></a><a id="runx--systemx--and-capturex"></a>runx(), systemx() and capturex()</h2>

<p>The <code>runx()</code>, <code>systemx()</code> and <code>capturex()</code> commands are identical to the multi-argument forms of <code>run()</code>, <code>system()</code> and <code>capture()</code> respectively, but <i>never</i> invoke the shell, even when called with a single argument. These forms are particularly useful when a command&#39;s argument list <i>might</i> be empty, for example:</p>

<pre><code>    systemx($cmd, @args);</code></pre>

<p>The use of <code>systemx()</code> here guarantees that the shell will <i>never</i> be invoked, even if <code>@args</code> is empty.</p>

<h2 id="Exception-handling"><a id="Exception"></a>Exception handling</h2>

<p>In the case where the command returns an unexpected status, both <code>run</code> and <code>capture</code> will throw an exception, which if not caught will terminate your program with an error.</p>

<p>Capturing the exception is easy:</p>

<pre><code>    eval {
        run(&quot;cat *.txt&quot;);
    };

    if ($@) {
        print &quot;Something went wrong - $@\n&quot;;
    }</code></pre>

<p>See the diagnostics section below for more details.</p>

<h3 id="Exception-cases"><a id="Exception1"></a>Exception cases</h3>

<p><code>IPC::System::Simple</code> considers the following to be unexpected, and worthy of exception:</p>

<ul>

<li><p>Failing to start entirely (eg, command not found, permission denied).</p>

</li>
<li><p>Returning an exit value other than zero (but see below).</p>

</li>
<li><p>Being killed by a signal.</p>

</li>
<li><p>Being passed tainted data (in taint mode).</p>

</li>
</ul>

<h2 id="Exit-values"><a id="Exit"></a>Exit values</h2>

<p>Traditionally, system commands return a zero status for success and a non-zero status for failure. <code>IPC::System::Simple</code> will default to throwing an exception if a non-zero exit value is returned.</p>

<p>You may specify a range of values which are considered acceptable exit values by passing an <i>array reference</i> as the first argument. The special constant <code>EXIT_ANY</code> can be used to allow <i>any</i> exit value to be returned.</p>

<pre><code>        use IPC::System::Simple qw(run system capture EXIT_ANY);

        run( [0..5], &quot;cat *.txt&quot;);             # Exit values 0-5 are OK

        system( [0..5], &quot;cat *.txt&quot;);          # This works the same way

        my @lines = capture( EXIT_ANY, &quot;cat *.txt&quot;); # Any exit is fine.</code></pre>

<p>The <code>run</code> and replacement <code>system</code> subroutines returns the exit value of the process:</p>

<pre><code>        my $exit_value = run( [0..5], &quot;cat *.txt&quot;);

        # OR:

        my $exit_value = system( [0..5] &quot;cat *.txt&quot;);

        print &quot;Program exited with value $exit_value\n&quot;;</code></pre>

<h3 id="$EXITVAL"><a id="EXITVAL"></a>$EXITVAL</h3>

<p>The exit value of any command executed by <code>IPC::System::Simple</code> can always be retrieved from the <code>$IPC::System::Simple::EXITVAL</code> variable:</p>

<p>This is particularly useful when inspecting results from <code>capture</code>, which returns the captured text from the command.</p>

<pre><code>        use IPC::System::Simple qw(capture $EXITVAL EXIT_ANY);

        my @enemies_defeated = capture(EXIT_ANY, &quot;defeat_evil&quot;, &quot;/dev/mordor&quot;);

        print &quot;Program exited with value $EXITVAL\n&quot;;</code></pre>

<p><code>$EXITVAL</code> will be set to <code>-1</code> if the command did not exit normally (eg, being terminated by a signal) or did not start. In this situation an exception will also be thrown.</p>

<h2 id="WINDOWS-SPECIFIC-NOTES"><a id="WINDOWS"></a>WINDOWS-SPECIFIC NOTES</h2>

<p>The <code>run</code> subroutine make available the full 32-bit exit value on Win32 systems. This has been true since <code>IPC::System::Simple</code> v0.06 when called with multiple arguments, and since v1.25 when called with a single argument. This is different from the previous versions of <code>IPC::System::Simple</code> and from Perl&#39;s in-build <code>system()</code> function, which can only handle 8-bit return values.</p>

<p>The <code>capture</code> subroutine always returns the 32-bit exit value under Windows. The <code>capture</code> subroutine also never uses the shell, even when passed a single argument.</p>

<p>The <code>run</code> subroutine always uses a shell when passed a single argument. On NT systems, it uses <code>cmd.exe</code> in the system root, and on non-NT systems it uses <code>command.com</code> in the system root.</p>

<p>As of <code>IPC::System::Simple</code> v1.25, the <code>runx</code> and <code>capturex</code> subroutines, as well as multiple-argument calls to the <code>run</code> and <code>capture</code> subroutines, have their arguments properly quoted, so that arugments with spaces and the like work properly. Unfortunately, this breaks any attempt to invoke the shell itself. If you really need to execute <code>cmd.exe</code> or <code>command.com</code>, use the single-argument form. For single-argument calls to <code>run</code> and <code>capture</code>, the argument must be properly shell-quoted in advance of the call.</p>

<p>Versions of <code>IPC::System::Simple</code> before v0.09 would not search the <code>PATH</code> environment variable when the multi-argument form of <code>run()</code> was called. Versions from v0.09 onwards correctly search the path provided the command is provided including the extension (eg, <code>notepad.exe</code> rather than just <code>notepad</code>, or <code>gvim.bat</code> rather than just <code>gvim</code>). If no extension is provided, <code>.exe</code> is assumed.</p>

<p>Signals are not supported on Windows systems. Sending a signal to a Windows process will usually cause it to exit with the signal number used.</p>

<h1 id="DIAGNOSTICS">DIAGNOSTICS</h1>

<dl>

<dt id="&quot;%s&quot;-failed-to-start:-&quot;%s&quot;"><a id="s--failed-to-start:--s"></a>&quot;%s&quot; failed to start: &quot;%s&quot;</dt>
<dd>

<p>The command specified did not even start. It may not exist, or you may not have permission to use it. The reason it could not start (as determined from <code>$!</code>) will be provided.</p>

</dd>
<dt id="&quot;%s&quot;-unexpectedly-returned-exit-value-%d"><a id="s--unexpectedly-returned-exit-value--d"></a>&quot;%s&quot; unexpectedly returned exit value %d</dt>
<dd>

<p>The command ran successfully, but returned an exit value we did not expect. The value returned is reported.</p>

</dd>
<dt id="&quot;%s&quot;-died-to-signal-&quot;%s&quot;-(%d)-%s"><a id="s--died-to-signal--s---d---s"></a>&quot;%s&quot; died to signal &quot;%s&quot; (%d) %s</dt>
<dd>

<p>The command was killed by a signal. The name of the signal will be reported, or <code>UNKNOWN</code> if it cannot be determined. The signal number is always reported. If we detected that the process dumped core, then the string <code>and dumped core</code> is appended.</p>

</dd>
<dt id="IPC::System::Simple::%s-called-with-no-arguments"><a id="IPC"></a><a id="IPC::System::Simple::-s-called-with-no-arguments"></a>IPC::System::Simple::%s called with no arguments</dt>
<dd>

<p>You attempted to call <code>run</code> or <code>capture</code> but did not provide any arguments at all. At the very lease you need to supply a command to run.</p>

</dd>
<dt id="IPC::System::Simple::%s-called-with-no-command"><a id="IPC1"></a><a id="IPC::System::Simple::-s-called-with-no-command"></a>IPC::System::Simple::%s called with no command</dt>
<dd>

<p>You called <code>run</code> or <code>capture</code> with a list of acceptable exit values, but no actual command.</p>

</dd>
<dt id="IPC::System::Simple::%s-called-with-tainted-argument-&quot;%s&quot;"><a id="IPC2"></a><a id="IPC::System::Simple::-s-called-with-tainted-argument--s"></a>IPC::System::Simple::%s called with tainted argument &quot;%s&quot;</dt>
<dd>

<p>You called <code>run</code> or <code>capture</code> with tainted (untrusted) arguments, which is almost certainly a bad idea. To untaint your arguments you&#39;ll need to pass your data through a regular expression and use the resulting match variables. See <a href="https://metacpan.org/pod/perlsec#Laundering-and-Detecting-Tainted-Data">&quot;Laundering and Detecting Tainted Data&quot; in perlsec</a> for more information.</p>

</dd>
<dt id="IPC::System::Simple::%s-called-with-tainted-environment-$ENV{%s}"><a id="IPC3"></a><a id="IPC::System::Simple::-s-called-with-tainted-environment--ENV-s"></a>IPC::System::Simple::%s called with tainted environment $ENV{%s}</dt>
<dd>

<p>You called <code>run</code> or <code>capture</code> but part of your environment was tainted (untrusted). You should either delete the named environment variable before calling <code>run</code>, or set it to an untainted value (usually one set inside your program). See <a href="https://metacpan.org/pod/perlsec#Cleaning-Up-Your-Path">&quot;Cleaning Up Your Path&quot; in perlsec</a> for more information.</p>

</dd>
<dt id="Error-in-IPC::System::Simple-plumbing:-&quot;%s&quot;-&quot;%s&quot;"><a id="Error"></a><a id="Error-in-IPC::System::Simple-plumbing:--s---s"></a>Error in IPC::System::Simple plumbing: &quot;%s&quot; - &quot;%s&quot;</dt>
<dd>

<p>Implementing the <code>capture</code> command involves dark and terrible magicks involving pipes, and one of them has sprung a leak. This could be due to a lack of file descriptors, although there are other possibilities.</p>

<p>If you are able to reproduce this error, you are encouraged to submit a bug report according to the <a href="./IPC::System::Simple.html#Reporting-bugs">&quot;Reporting bugs&quot;</a> section below.</p>

</dd>
<dt id="Internal-error-in-IPC::System::Simple:-&quot;%s&quot;"><a id="Internal"></a><a id="Internal-error-in-IPC::System::Simple:--s"></a>Internal error in IPC::System::Simple: &quot;%s&quot;</dt>
<dd>

<p>You&#39;ve found a bug in <code>IPC::System::Simple</code>. Please check to see if an updated version of <code>IPC::System::Simple</code> is available. If not, please file a bug report according to the <a href="./IPC::System::Simple.html#Reporting-bugs">&quot;Reporting bugs&quot;</a> section below.</p>

</dd>
<dt id="IPC::System::Simple::%s-called-with-undefined-command"><a id="IPC4"></a><a id="IPC::System::Simple::-s-called-with-undefined-command"></a>IPC::System::Simple::%s called with undefined command</dt>
<dd>

<p>You&#39;ve passed the undefined value as a command to be executed. While this is a very Zen-like action, it&#39;s not supported by Perl&#39;s current implementation.</p>

</dd>
</dl>

<h1 id="DEPENDENCIES">DEPENDENCIES</h1>

<p>This module depends upon <a href="./Win32::Process.html">Win32::Process</a> when used on Win32 system. <code>Win32::Process</code> is bundled as a core module in ActivePerl 5.6 and above.</p>

<p>There are no non-core dependencies on non-Win32 systems.</p>

<h1 id="COMPARISON-TO-OTHER-APIs"><a id="COMPARISON"></a>COMPARISON TO OTHER APIs</h1>

<p>Perl provides a range of in-built functions for handling external commands, and CPAN provides even more. The <code>IPC::System::Simple</code> differentiates itself from other options by providing:</p>

<dl>

<dt id="Extremely-detailed-diagnostics"><a id="Extremely"></a>Extremely detailed diagnostics</dt>
<dd>

<p>The diagnostics produced by <code>IPC::System::Simple</code> are designed to provide as much information as possible. Rather than requiring the developer to inspect <code>$?</code>, <code>IPC::System::Simple</code> does the hard work for you.</p>

<p>If an odd exit status is provided, you&#39;re informed of what it is. If a signal kills your process, you are informed of both its name and number. If tainted data or environment prevents your command from running, you are informed of exactly which data or environmental variable is tainted.</p>

</dd>
<dt id="Exceptions-on-failure"><a id="Exceptions"></a>Exceptions on failure</dt>
<dd>

<p><code>IPC::System::Simple</code> takes an aggressive approach to error handling. Rather than allow commands to fail silently, exceptions are thrown when unexpected results are seen. This allows for easy development using a try/catch style, and avoids the possibility of accidentally continuing after a failed command.</p>

</dd>
<dt id="Easy-access-to-exit-status"><a id="Easy"></a>Easy access to exit status</dt>
<dd>

<p>The <code>run</code>, <code>system</code> and <code>capture</code> commands all set <code>$EXITVAL</code>, making it easy to determine the exit status of a command. Additionally, the <code>system</code> and <code>run</code> interfaces return the exit status.</p>

</dd>
<dt id="Consistent-interfaces"><a id="Consistent"></a>Consistent interfaces</dt>
<dd>

<p>When called with multiple arguments, the <code>run</code>, <code>system</code> and <code>capture</code> interfaces <i>never</i> invoke the shell. This differs from the in-built Perl <code>system</code> command which may invoke the shell under Windows when called with multiple arguments. It differs from the in-built Perl backticks operator which always invokes the shell.</p>

</dd>
</dl>

<h1 id="BUGS">BUGS</h1>

<p>When <code>system</code> is exported, the exotic form <code>system { $cmd } @args</code> is not supported. Attemping to use the exotic form is a syntax error. This affects the calling package <i>only</i>. Use <code>CORE::system</code> if you need it, or consider using the <a href="https://metacpan.org/pod/autodie">autodie</a> module to replace <code>system</code> with lexical scope.</p>

<p>Core dumps are only checked for when a process dies due to a signal. It is not believed there are any systems where processes can dump core without dying to a signal.</p>

<p><code>WIFSTOPPED</code> status is not checked, as perl never spawns processes with the <code>WUNTRACED</code> option.</p>

<p>Signals are not supported under Win32 systems, since they don&#39;t work at all like Unix signals. Win32 signals cause commands to exit with a given exit value, which this modules <i>does</i> capture.</p>

<h2 id="Reporting-bugs"><a id="Reporting"></a>Reporting bugs</h2>

<p>Before reporting a bug, please check to ensure you are using the most recent version of <code>IPC::System::Simple</code>. Your problem may have already been fixed in a new release.</p>

<p>You can find the <code>IPC::System::Simple</code> bug-tracker at <a href="http://rt.cpan.org/Public/Dist/Display.html?Name=IPC-System-Simple">http://rt.cpan.org/Public/Dist/Display.html?Name=IPC-System-Simple</a> . Please check to see if your bug has already been reported; if in doubt, report yours anyway.</p>

<p>Submitting a patch and/or failing test case will greatly expedite the fixing of bugs.</p>

<h1 id="FEEDBACK">FEEDBACK</h1>

<p>If you find this module useful, please consider rating it on the CPAN Ratings service at <a href="http://cpanratings.perl.org/rate/?distribution=IPC-System-Simple">http://cpanratings.perl.org/rate/?distribution=IPC-System-Simple</a> .</p>

<p>The module author loves to hear how <code>IPC::System::Simple</code> has made your life better (or worse). Feedback can be sent to &lt;pjf@perltraining.com.au&gt;.</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p><a href="https://metacpan.org/pod/autodie">autodie</a> uses <code>IPC::System::Simple</code> to provide succeed-or-die replacements to <code>system</code> (and other built-ins) with lexical scope.</p>

<p><a href="https://metacpan.org/pod/POSIX">POSIX</a>, <a href="https://metacpan.org/pod/IPC::Run::Simple">IPC::Run::Simple</a>, <a href="https://metacpan.org/pod/perlipc">perlipc</a>, <a href="https://metacpan.org/pod/perlport">perlport</a>, <a href="./IPC::Run.html">IPC::Run</a>, <a href="https://metacpan.org/pod/IPC::Run3">IPC::Run3</a>, <a href="./Win32::Process.html">Win32::Process</a></p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Paul Fenwick &lt;pjf@cpan.org&gt;</p>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>Copyright (C) 2006-2008 by Paul Fenwick</p>

<p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.0 or, at your option, any later version of Perl 5 you may have available.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install IPC::System::Simple, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm IPC::System::Simple</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install IPC::System::Simple</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./IPC::System::Simple.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
